﻿using System;

namespace SteeringBehaviors
{
	// Token: 0x02000221 RID: 545
	public class MoveInDirection : SteerBehavior
	{
		// Token: 0x06000B62 RID: 2914 RVA: 0x0005ED50 File Offset: 0x0005CF50
		public MoveInDirection(MovementCharacter agent, VectorKinematic target) : base(agent, target)
		{
		}

		// Token: 0x06000B63 RID: 2915 RVA: 0x0005F834 File Offset: 0x0005DA34
		public override SteeringOutput GetSteering()
		{
			this.Weight = 0f;
			this.pSteering.overrideUpdateReset = true;
			this.pSteering.linear = this.target.position;
			this.pSteering.linear.y = 0f;
			this.pSteering.linear.Normalize();
			float maxAccel = this.agent.MaxAccel;
			SteeringOutput pSteering = this.pSteering;
			pSteering.linear.x = pSteering.linear.x * maxAccel;
			SteeringOutput pSteering2 = this.pSteering;
			pSteering2.linear.y = pSteering2.linear.y * maxAccel;
			SteeringOutput pSteering3 = this.pSteering;
			pSteering3.linear.z = pSteering3.linear.z * maxAccel;
			return this.pSteering;
		}
	}
}
